package com.geoway.adf.report.controller;

import com.geoway.adf.report.excel.workbook.WorkBook;
import com.geoway.adf.report.service.ReportService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: lzw
 * @Date: 2024/1/22 15:48
 * @Description:
 */
@Slf4j
@RestController
@RequestMapping(value = "/report", produces = {"application/json;charset=UTF-8" })
public class ReportController {
    @Autowired
    private ReportService reportService;

    @GetMapping("/findById")
    public WorkBook findById(String id){
        return reportService.findById(id);
    }

    @PostMapping("/save")
    public WorkBook save(@RequestBody WorkBook workBook){
        return reportService.save(workBook);
    }
}
